package com.wlcj.www.enumtype;

public enum PlatformDataUnit {
	YESTERDAY("volume", "亿"),
	LAST7("compound_interest", "%"),
	LAST30("investment_num", "人"),
	JIEKUANRENSHU("borrower_num", "人"),
	PINGJUNJIEKUANQIXIAN("average_loan_time", "月"),
	INFLOWS("inflows","亿"),
	STILL("60_still","亿"),
	CUMULATIVE_AMOUNT("cumulative_amount","亿"); 
	private String code;
	private String desc;
	public String getCode() {
		return code;
	}

	public String getDesc() {
		return desc;
	}
	
	
	

	private PlatformDataUnit(String  code, String desc) {
		this.code = code;
		this.desc = desc;
	}
	public static PlatformDataUnit getEnumByName(String  code) {
		PlatformDataUnit[] enums = PlatformDataUnit.values();
		for(PlatformDataUnit enumtype:enums) {
			if(code.equals(enumtype.getCode())) {
				return enumtype;
			}
		}
		return YESTERDAY;
	}

}
